//
//  Common.swift
//  WeiBo_One
//
//  Created by apple on 15/10/26.
//  Copyright © 2015年 蜡笔小炎. All rights reserved.
//

import Foundation
import UIKit

// 切换跟控制器通知
let WBSwitchRootControllerNotification = "WBSwitchRootControllerNotification"
// 全局颜色
let WeiBoAppearanceTintColor = UIColor.orangeColor()

/// 延迟在主线程执行函数
/// delta： 延时（秒）
/// callFunc: 执行闭包
func delay(delta: Double, callFunc: () -> ()) {
    
    dispatch_after(
        dispatch_time(DISPATCH_TIME_NOW, Int64(delta * Double(NSEC_PER_SEC))),
        dispatch_get_main_queue()) { () -> Void in
            
            callFunc()
    }
}